]> dgit.raspbian.org Git - gnome-shell.git/commit
dbusService/screencast: Hold during gstreamer checks
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 6 Nov 2022 10:56:41 +0000 (11:56 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 9 Nov 2022 11:15:04 +0000 (11:15 +0000)
commita2acecb491e53e889dd995d3db386aaa182e04a0
tree931fa773c317b61fae5752186ddf09f3c30e1929
parent9bc24cd27132ac59035634928c130fdd6390a003
dbusService/screencast: Hold during gstreamer checks

Some gstreamer plugins require a connection to the display server,
so they block until the server is up and running. That's why we
moved the check into the D-Bus service, so that the blocking would
not lock up the compositor itself.

However the block can still delay the service initialization so
much that auto-shutdown hits immediately when returning from the
constructor. If that happens, the proxy on the shell side is no
longer backed by a remote object when the init callback runs, and
all properties therefore resolve as `null`.

As a result, gnome-shell thinks that screencasts aren't supported
and hides the screencast button.

Fix this by holding the service during the gstreamer checks, so
that the auto-shutdown timeout only starts after the service is
ready.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6051

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2533>
js/dbusServices/screencast/screencastService.js